<form id="pagerForm" method="post" action="{:U($module_name.'/'.$action_name."?model=".$model)}">
    <input type="hidden" name="pageNum" value="{$pageNum}" />
    <input type="hidden" name="numPerPage" value="{$numPerPage}" />
    <input type="hidden" name="orderField" value="{$orderField}" />
    <input type="hidden" name="orderDirection" value="{$orderDirection}" />
</form>
<div class="pageHeader">
   
</div>
<div class="pageContent" layoutH="52">

<br /> 	
<table border="1"  >
 <tr height="40">
    <td rowspan="{$list.cz.total.count}" align="center" width="100" valign="middle">&nbsp;</td>
    <td align="center" valign="middle" width="120" >类型</td>
	<td align="center" valign="middle" width="150">充值</td>
    <td align="center" valign="middle" width="80">手续费率</td>
    <td align="center" valign="middle" width="200">手续费</td>
	<td align="center" valign="middle" width="200">操作</td>
  </tr>
 
 
 <volist name="czlist" id="cz">
   <tr height="50">
   	{if $key == 0}
   	<td rowspan="{$czcount}"  align="center" valign="middle">充值 </td>
	{/if}
    <td align="center" valign="middle">{$changtype[$cz['changtype']]}&nbsp;</td>
    <td align="center" valign="middle">{$cz.value}&nbsp;</td>
    <td align="center" valign="middle">{$rate[$cz['changtype']]}&nbsp;</td>  
	<td align="center" valign="middle"><php>echo round(((float)$rate[$cz['changtype']]/100)*$cz['value'],2);</php></td>
	<td align="center" valign="middle"><a href="{if $cz['changtype'] == 'couponxfcz'}{:U('Money/coupon')}{else}{:U('Money/assets',array('subject'=>$cz['subject'],'changtype'=>$cz['changtype']))}{/if}" target="navTab" rel=''>明细</a></td>  
	<php>$cztotal += $cz['value'];</php>
  </tr>
</volist>

 <tr height="50">
    <td align="center" valign="middle">总计</td>
    <td align="center" valign="middle"><b>{$cztotal}</b>&nbsp;</td>  
	<td align="center" valign="middle" width="200">0.44%</td>
	<td align="center" valign="middle" width="200"><php>echo round(0.0044*$cztotal,2);</php></td>
	<td align="center" valign="middle"></td>  
  </tr>

<volist name="xflist" id="xf">
 <tr height="50">
    {if $key == 0}
   	<td rowspan="{$xfcount}"  align="center" valign="middle">消费 </td>
	{/if}
    <td align="center" valign="middle">{$changtype[$xf['changtype']]}&nbsp;</td>
    <td align="center" valign="middle">{$xf['value']}&nbsp;</td> 
	<td align="center" valign="middle" width="200">0</td>
	<td align="center" valign="middle" width="200">0</td> 
	<td align="center" valign="middle"><a href="{if $xf['changtype'] == 'couponxf'}{:U('Money/coupon',array('status'=>1))}{else}{:U('Money/assets',array('subject'=>$xf['subject'],'changtype'=>$xf['changtype']))}{/if}" target="navTab" rel=''>明细</a></td>  
  </tr>
  <php>$xftotal += $xf['value'];</php>
  </volist>

 <tr height="50">
    <td align="center" valign="middle">&nbsp;</td>
    <td align="center" valign="middle">沉积资金&nbsp;</td>
    <td align="center" valign="middle"><php>echo $cztotal-$xftotal;</php></td>  
	<td align="center" valign="middle" width="200"></td>
	<td align="center" valign="middle" width="200"></td>
	<td align="center" valign="middle"></td>  
  </tr>

</table>

<br />
<!-- begin 日结算 -->
<table>
	<tr>
<php>foreach($daylist as $dkey=>$dayvo){</php>
<td>
<table border="1"  >
 <tr height="30">
    <td width="120" height="30" align="center" valign="middle" ><b>时间</b></td>
	<td width="150" height="30" align="center" valign="middle"><b>{$dayvo.start_date|date='Y/m/d',###}</b></td>
 </tr>
 <tr height="30">
 	<td height="30" align="center" valign="middle">昨天结余</td>
    <td height="30" align="center" valign="middle">{$daylist[$dkey+1]['surplus']}</td> 
 </tr>
  <tr height="30">
 	<td height="30" align="center" valign="middle">收入资金</td>
    <td height="30" align="center" valign="middle">{$dayvo.earning}&nbsp;</td> 
 </tr>
  <tr height="30">
 	<td height="30" align="center" valign="middle">采购支出</td>
    <td height="30" align="center" valign="middle">{$dayvo.expend}&nbsp;</td> 
 </tr>
<tr height="30">
 	<td height="30" align="center" valign="middle">结余现金</td>
    <td height="30" align="center" valign="middle">{$dayvo.surplus}&nbsp;</td> 
 </tr>
</table>
</td>
<td width='25'>&nbsp;</td>
<php>}</php>
<br />
</tr>
</table>
<!-- end 日结算 -->

<br/>
<!-- begin 周结算 -->
<table>
	<tr>
<php>foreach($weeklist as $wkey=>$weekvo){</php>
<td>
<table border="1"  >
 <tr height="30">
    <td width="120" height="30" align="center" valign="middle" ><b>时间</b></td>
	<td width="150" height="30" align="center" valign="middle"><b>{$weekvo.start_date|date='Y/m/d',###}-{$weekvo.end_date|date='Y/m/d',###}</b></td>
 </tr>
 <tr height="30">
 	<td height="30" align="center" valign="middle">周结余</td>
    <td height="30" align="center" valign="middle">{$weeklist[$wkey+1]['surplus']}</td> 
 </tr>
  <tr height="30">
 	<td height="30" align="center" valign="middle">收入资金</td>
    <td height="30" align="center" valign="middle">{$weekvo.earning}&nbsp;</td> 
 </tr>
  <tr height="30">
 	<td height="30" align="center" valign="middle">采购支出</td>
    <td height="30" align="center" valign="middle">{$weekvo.expend}&nbsp;</td> 
 </tr>
<tr height="30">
 	<td height="30" align="center" valign="middle">结余现金</td>
    <td height="30" align="center" valign="middle">{$weekvo.surplus}&nbsp;</td> 
 </tr>
</table>
</td>
<td width='25'>&nbsp;</td>
<php>}</php>
</tr>
</table>
<!-- end 周结算 -->
<br />

<!-- begin 月结算 -->
<table>
	<tr>
<php>foreach($monthlist as $mkey=>$monthkvo){</php>
<td>
<table border="1"  >
 <tr height="30">
    <td width="120" height="30" align="center" valign="middle" ><b>时间</b></td>
	<td width="150" height="30" align="center" valign="middle"><b>{$monthkvo.start_date|date='Y-m',###}月</b></td>
 </tr>
 <tr height="30">
 	<td height="30" align="center" valign="middle">月结余</td>
    <td height="30" align="center" valign="middle">{$monthlist[$mkey+1]['surplus']}</td> 
 </tr>
  <tr height="30">
 	<td height="30" align="center" valign="middle">收入资金</td>
    <td height="30" align="center" valign="middle">{$monthkvo.earning}&nbsp;</td> 
 </tr>
  <tr height="30">
 	<td height="30" align="center" valign="middle">采购支出</td>
    <td height="30" align="center" valign="middle">{$monthkvo.expend}&nbsp;</td> 
 </tr>
<tr height="30">
 	<td height="30" align="center" valign="middle">结余现金</td>
    <td height="30" align="center" valign="middle">{$monthkvo.surplus}&nbsp;</td> 
 </tr>
</table>
</td>
<td width='25'>&nbsp;</td>
<php>}</php>
</tr>
</table>
<!-- end 月结算 -->

<!--
<a href="{:U('Count/daycount')}">日统计</a>
<a href="{:U('Count/weekcount')}">周统计</a>
<a href="{:U('Count/monthcount')}">月统计</a>
-->
</div>
